package main
import (
	"fmt"
	"time"
)
func fibonacci(ch chan int, quit chan bool)  {
	fmt.Println("kkkkkkkk")
	x,y:=1,1
	for {
		select {
		case ch<- x:
			time.Sleep(time.Second)
                x,y=y,x+y
		case <-quit:
			return
		}
	}
}
func main()  {
    ch:=make(chan int)
    quit:=make(chan bool)
    go func() {
		for i:=0; i<8; i++{
			num:=<-ch
			fmt.Println(num)
		}
		quit <- true
	}()
	fibonacci(ch,quit)
}
